#include<stdio.h>

int main()
{
    int a,b,c,count=0;
    printf("The total different ways:\n");
    for(a=1;a<=5;a++)
    {
        for(b=1;b<=5;b++)
        {
            for(c=1;a!=b&&c<=5;c++)
            {
                if(c!=a&&c!=b)
                {count++;
                printf("%d :%d %d %d\n",count,a,b,c);}
            }

        }
    }

    return 0;
}